/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.openbookformat.defaultparser.latex;

import java.io.IOException;
import java.net.URL;
import javax.swing.JPanel;
import org.openide.util.Exceptions;

public final class TexVisualPanel4 extends JPanel {

    /** Creates new form TexVisualPanel4 */
    public TexVisualPanel4() {
        initComponents();
        
         try {
            URL hlpFile = TexVisualPanel2.class.getResource(
                    "help/Fancyhdr.html");
            jEditorPane1.setPage(hlpFile);
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
        }
    }

    @Override
    public String getName() {
        return  org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, 
                "TexVisualPanel4.Name");
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        texSource = new javax.swing.JTextArea();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jEditorPane1 = new javax.swing.JEditorPane();
        jUsePackage = new javax.swing.JCheckBox();

        texSource.setColumns(20);
        texSource.setRows(5);
        texSource.setText(org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, "TexVisualPanel4.texSource.text")); // NOI18N
        jScrollPane2.setViewportView(texSource);

        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, "TexVisualPanel4.jLabel2.text")); // NOI18N

        jEditorPane1.setContentType(org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, "TexVisualPanel4.jEditorPane1.contentType")); // NOI18N
        jEditorPane1.setEditable(false);
        jEditorPane1.setText(org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, "TexVisualPanel4.jEditorPane1.text")); // NOI18N
        jScrollPane1.setViewportView(jEditorPane1);

        org.openide.awt.Mnemonics.setLocalizedText(jUsePackage, org.openide.util.NbBundle.getMessage(TexVisualPanel4.class, "TexVisualPanel4.jUsePackage.text")); // NOI18N
        jUsePackage.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jUsePackageStateChanged(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                    .addComponent(jLabel2)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                    .addComponent(jUsePackage))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jUsePackage)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jUsePackageStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jUsePackageStateChanged
       texSource.setEnabled(jUsePackage.isSelected());
    }//GEN-LAST:event_jUsePackageStateChanged

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JEditorPane jEditorPane1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JCheckBox jUsePackage;
    private javax.swing.JTextArea texSource;
    // End of variables declaration//GEN-END:variables
}
